package com.jms.tomcat.mapping;

import javax.servlet.Servlet;
/**
 * servlet映射类
 * 用于匹配servlet
 */
public class ServletMapping extends JmsMapping<Servlet>{

    public ServletMapping(Servlet servlet, String uri) {
        if (uri == null) {
            throw new IllegalArgumentException(String.format("can not create a ServletMapping for %s, uri is null or empty", servlet.getClass().getName()));
        }
        object = servlet;
        pattern = buildPattern(uri);
    }

}
